﻿using ASPNETIdentity;
using Eco.MVC;
using EcoProject1.EcoSpaceAndModel1;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;


namespace MVC5.Controllers
{
 [RequireHttps]
  public class HomeController :  ModelDrivenControllerBase<EcoProject1EcoSpace> //Main reason for making this model aware is to handle menu items with DisplayWecpofGlobalNavigatingActions
    {
     static HomeController()
     {

     }

     protected override void AfterEcoSpaceCreate()
     {
         base.AfterEcoSpaceCreate();
         string id = null;
         if (this.User.Identity != null)
             id = this.User.Identity.GetUserId();
         SysSingleton.InstallCurrentUser(id, EcoSpace);
     }

        public ActionResult Index()
        {
            return View(EcoProject1.EcoSpaceAndModel1.ViewModelCodeGen_HomeGenericInfo.HomeGenericInfo.Create(this.EcoSpace, null));
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View(EcoProject1.EcoSpaceAndModel1.ViewModelCodeGen_HomeGenericInfo.HomeGenericInfo.Create(this.EcoSpace, null));
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View(EcoProject1.EcoSpaceAndModel1.ViewModelCodeGen_HomeGenericInfo.HomeGenericInfo.Create(this.EcoSpace, null));
        }
    }
}